(use-package exwm-surf
  :disabled
  :hook
  (exwm-manage-finish . exwm-surf-init)
  :custom
  (exwm-surf-key-bindings
   '(("C-s" . exwm-surf-search)
     ("C-r" . exwm-surf-search)
     ;; ("C-o" . exwm-surf-history)
     ("C-M-j" . exwm-surf-edit-url)
     ;; ("M-b" . exwm-surf-bookmark)
     ;; ("C-M-b" . exwm-surf-add-bookmark)
     ("C-j" . exwm-surf-url-to-kill-ring)
     ;; ("C-j" . exwm-surf-yank-url)
     ("& &" . qrthi/exwm-surf-open-in-text-browser)))
  :init
  (defun qrthi/exwm-surf-open-in-text-browser (&optional session)
    "Open the current Surf URL in text browser"
    (interactive)
    (let* ((winid (exwm-surf-current-buffer-window-id))
	   (url (exwm-surf-get-prop exwm-surf-prop-uri winid)))
      (qrthi/browse-url-text-browser url session)))
  )
